package ru.ccfit.nsu.g7204.dronov.adPlatform;

/**
 * Created by IntelliJ IDEA.
 * User: Drongo
 * Date: 28.03.11
 * Time: 22:03
 * To change this template use File | Settings | File Templates.
 */
public class Settings {

    private int port;
    private String dbUrl;
    private String dbUser;
    private String dbUserPass;

    private boolean portChanged;

    public boolean isPortChanged() {
        return portChanged;
    }


    private boolean dbParamsChanged;

    public boolean isDbParamsChanged() {
        return dbParamsChanged;
    }

    public Settings(int port, String dbUrl, String dbUser, String dbUserPass) {
        this.port = port;
        this.dbUrl = dbUrl;
        this.dbUser = dbUser;
        this.dbUserPass = dbUserPass;
        portChanged=false;
        dbParamsChanged=false;
    }

    public Settings() {
        port=2269;
        dbUrl="localhost/ad_profiles";
        dbUser="root";
        dbUserPass="dron";
        portChanged=false;
        dbParamsChanged=false;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
        portChanged=true;
    }

    public String getDbUrl() {
        return dbUrl;
    }

    public void setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
        dbParamsChanged=true;
    }

    public String getDbUser() {
        return dbUser;
    }

    public void setDbUser(String dbUser) {
        this.dbUser = dbUser;
        dbParamsChanged=true;
    }

    public String getDbUserPass() {
        return dbUserPass;
    }

    public void setDbUserPass(String dbUserPass) {
        this.dbUserPass = dbUserPass;
        dbParamsChanged=true;
    }
}
